<div class="user-home-user-name">${user.userName}</div>
<div class="user-home-op-btn">
    <#if Session["session_user_key"]??&&session_user_key.userId==user.userId>
        <a href="${absolutePath}/admin/update_user.action" class="btn">后台管理</a>&nbsp;&nbsp;
        <a href="${absolutePath}/admin/add_blog.action" class="btn">写博客</a>
        <#else>
            <#assign btnName="&nbsp;&nbsp;关&nbsp;&nbsp;&nbsp;&nbsp;注&nbsp;&nbsp;">
                <#assign focusType=1>
                    <#if user.haveFocus>
                        <#assign btnName="取消关注">
                            <#assign focusType=2>
                    </#if>
                    <a href="javascript:;" focusType=${focusType} id="focus-btn" class="btn">${btnName}</a>
    </#if>
</div>
<div class="user-home-friend">
    <span id="left-fans-count">${user.fansCount!0}</span>粉丝&nbsp;&nbsp;/&nbsp;&nbsp;<span id="left-focus-count">${user.focusCount!0}</span>关注
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">积分:</span>
    <span class="user-home-info">${user.mark}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">性别:</span>
	<span class="user-home-info">
		<#if user.sex??>
			<#if user.sex=='M'>
				男
				<#elseif user.sex=='F'>
				女
			</#if>
			<#else>
			未知
		</#if>
	</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">出生日期:</span>
    <span class="user-home-info">${user.birthday!'未知'}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">工作:</span>
    <span class="user-home-info">${user.work!'未知'}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">地区:</span>
    <span class="user-home-info">${user.address!'未知'}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">加入时间:</span>
    <span class="user-home-info">${user.showRegisterTime!'未知'}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">上次登录:</span>
    <span class="user-home-info">${user.showlastLoginTime!'未知'}</span>
</div>
<div class="user-home-info-item">
    <span class="user-home-info-tit">个性签名:</span>
    <span class="user-home-info">${user.characters!'这个人很懒什么也没留下'}</span>
</div>

<div style="text-align: center;margin: 10px 0px;">
    <script type="text/javascript">
        /*个人中心*/
        var cpro_id = "u2490932";
    </script>
    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
</div>

<script>
    $(function () {
        $("#focus-btn").click(function () {
            if (ulewo.user.userId == "") {
                ulewo.goLogin();
                return;
            }
            var focusType = $(this).attr("focusType");
            var url = "";
            if (focusType == "1") {//关注
                url = ulewo.absolutePath + "/user/focus.action";
            } else if (focusType == "2") {
                url = ulewo.absolutePath + "/user/cancel_focus.action";
            }
            var that = $(this);
            ulewo.ajaxRequest({
                url: url, data: {
                    friendUserId: "${user.userId}"
                }, fun: function (res) {
                    if (focusType == "1") {
                        that.attr("focusType", 2);
                        that.html("取消关注");
                        $("#left-fans-count").text(parseInt($("#left-fans-count").text()) + 1);
                    } else if (focusType == "2") {
                        that.attr("focusType", 1);
                        that.html("&nbsp;&nbsp;关&nbsp;&nbsp;&nbsp;&nbsp;注&nbsp;&nbsp;");
                        $("#left-fans-count").text(parseInt($("#left-fans-count").text()) - 1);
                    }
                }
            });
        });
    })
</script>